home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr36 / fgdemo40.zip / FGDEMO.DOC < prev    next >
Text File  |  1995-02-12  |  48KB  |  962 lines

  1.                              FGDEMO version 4.0
  2.  
  3. Ted Gruber Software                                      Voice: (702) 735-1980
  4. PO Box 13408                                               FAX: (702) 735-4603
  5. Las Vegas, NV  89112                                       BBS: (702) 796-7134
  6.                                                            CIS:     72000,1642
  7.  
  8. ------------------------------------------------------------------------------
  9.       FGDEMO: the demo program for Fastgraph 4.0 and Fastgraph/Light 4.0
  10. ------------------------------------------------------------------------------
  11.  
  12. The FGDEMO program illustrates some of the features of the Fastgraph (tm)
  13. graphics library. FGDEMO was written by Diana Gruber, senior programmer at Ted
  14. Gruber Software. You can contact Ted Gruber Software at the address and phone
  15. numbers listed at the bottom of this file.
  16.  
  17. Fastgraph is a programmer's graphics library, a programming tool useful for
  18. writing games and other graphics-based programs. There is more information
  19. about Fastgraph in a later section of this file.
  20.  
  21. ------------------------------------------------------------------------------
  22.                                Running FGDEMO
  23. ------------------------------------------------------------------------------
  24.  
  25. You can install FGDEMO on a hard disk or run it from diskette. Just type
  26. FGDEMO at the DOS command prompt. To install FGDEMO on a hard disk, create a
  27. subdirectory and copy all the files from the diskette to the subdirectory.
  28.  
  29. When you start FGDEMO, you'll see an attractive scrolling sky and scaling logo
  30. appear. This display uses the 320x200x256 "mode X" graphics mode. In a few
  31. seconds, or when you press any key, the sky and logo will disappear, FGDEMO
  32. will switch to the 640x350x16 EGA/VGA graphics mode, and the main menu screen
  33. will appear. From this screen you may choose options using the point and click
  34. vertical menus to view various Fastgraph features and effects.
  35.  
  36. ------------------------------------------------------------------------------
  37.                               FGDEMO source code
  38. ------------------------------------------------------------------------------
  39.  
  40. FGDEMO is distributed with full C source code. You may use the FGDEMO source
  41. code in your Fastgraph and FG/Light applications. If you want to recompile any
  42. of the FGDEMO source code, you'll need one of the supported compilers and
  43. either Fastgraph version 4.0 or Fastgraph/Light version 4.0. If you want to
  44. use this code, and you don't have a copy of Fastgraph, please contact Ted
  45. Gruber Software. If you want to "try before you buy", we will gladly send you
  46. an evaluation copy of Fastgraph/Light, the shareware version of Fastgraph, at
  47. no charge. You can also obtain Fastgraph/Light from our technical support BBS,
  48. or from our internet ftp site (ftp.accessnv.com).
  49.  
  50. Because of space constraints, the FGDEMO source code is distributed in an
  51. archived format. To unarchive the source code, copy all FGDEMO files to a
  52. subdirectory on your hard disk, then type SOURCE. This runs a self-extracting
  53. archive (SOURCE.COM) that will copy the FGDEMO source code files to the
  54. current directory. Note that it's not necessary to unarchive the source code
  55. if you just want to run FGDEMO.
  56.  
  57. ------------------------------------------------------------------------------
  58.                               Distributing FGDEMO
  59. ------------------------------------------------------------------------------
  60.  
  61. You may freely distribute FGDEMO as long as all the files are distributed
  62. together in their original unaltered state. If you want to zip the files
  63. together for BBS distribution, please use the file name FGDEMO40.ZIP for
  64. version 4.0 of FGDEMO. The following files are included in the FGDEMO
  65. distribution:
  66.  
  67. FGDEMO files:
  68.  
  69.   FGDEMO   EXE  the FGDEMO program
  70.   FGDEMO   DOC  this file: documentation
  71.   ORDER    FRM  Fastgraph order form
  72.   SOURCE   COM  self-extracting archive containing FGDEMO source code
  73.  
  74.   TGSDEMO  EXE  the TGSDEMO program (sky and logo demo)
  75.   TGSDEMO  FGI  image resource file for TGSDEMO program
  76.  
  77.   FONT14   PCX  14 point font file
  78.   BORLAND  PCX  image files for various effects
  79.   DUB      PCX
  80.   MOUNTAIN PCX
  81.   MOUSE    PCX
  82.  
  83.   FILE_ID  DIZ  for PCBoard bulletin board descriptions
  84.  
  85. The following files are archived in the SOURCE.COM file:
  86.  
  87. C and C++ source code files:
  88.   CHAR     C    character display and management functions
  89.   COMMON   C    initialization, termination, general I/O functions
  90.   DISPLAY  C    functions on Display submenu
  91.   FGDEMO   C    function 'main' and screen drawing functions
  92.   FILE     C    functions on File submenu
  93.   FUNDMTLS C    functions on Fundamentals submenu
  94.   MENU     C    define and manage the horizontal and vertical menus
  95.   MISC     C    functions on Miscellaneous submenu
  96.   VIDEO    C    functions on Video submenu
  97.   TGSDEMO  CPP  moving sky with scaled logo demo program
  98.  
  99. Header files:
  100.   DECLARE  H    function declarations (included in DEFS.H)
  101.   DEFS     H    general declarations and definitions (all C files)
  102.   BIRDS    H    bird animation bitmaps (MISC.C and DISPLAY.C)
  103.   FGTITLE  H    bitmapped "Fastgraph" letters (MISC.C)
  104.   FIGHTER  H    bitmapped airplane for keyboard handler (MISC.C)
  105.   TNTMAPS  H    TNT and "Kablooy" bitmaps for explosion (DISPLAY.C)
  106.  
  107. Compilation batch files, make files, and project files:
  108.   BUILDBC  BAT  batch file to compile and link FGDEMO with Borland C++
  109.   BUILDMSC BAT  batch file for Microsoft C/C++ or Visual C++
  110.   BUILDPC  BAT  batch file for Power C
  111.   BUILDQC  BAT  batch file for Microsoft QuickC
  112.   BUILDTC  BAT  batch file for Turbo C/C++
  113.   BUILDWC  BAT  batch file for Watcom C/C++ (16-bit)
  114.   FGDEMOBC MAK  make file for Borland C++
  115.   FGDEMOMC MAK  make file for Microsoft C/C++
  116.   FGDEMOQC MAK  make file for Microsoft QuickC
  117.   FGDEMOVC MAK  make file for Microsoft Visual C++ (16-bit)
  118.   FGDEMOWC MAK  make file for Watcom C/C++ (16-bit)
  119.   FGDEMOBC PRJ  project file for Borland C++
  120.   FGDEMOPC PRJ  project file for Power C
  121.   FGDEMOTC PRJ  project file for Turbo C++
  122.  
  123. ------------------------------------------------------------------------------
  124.                          Compiling and linking FGDEMO
  125. ------------------------------------------------------------------------------
  126.  
  127. You may recompile the FGDEMO source code using Borland C++, Microsoft C/C++,
  128. QuickC, Power C, Turbo C/C++, Visual C++ (16-bit), or Watcom C++ (16-bit). The
  129. medium memory model is recommended (the large model will also work). FGDEMO is
  130. too big to use the small memory model. The remainder of this section will
  131. describe the batch files, make files, and project files included in the FGDEMO
  132. distribution to assist with compilation and linking.
  133.  
  134.  
  135. Borland C++
  136.  
  137. A make file (FGDEMOBC.MAK) and batch file (BUILDBC.BAT) are provided for
  138. compiling and linking FGDEMO with Borland C++. Type "MAKE -fFGDEMOBC.MAK" to
  139. use the make file, or BUILDBC to recompile and link all the FGDEMO code. The
  140. make file and batch file are set up to use the Fastgraph/Light medium model
  141. library. Change the library name from FGLM.LIB to FGM.LIB in the TLINK command
  142. to use Fastgraph instead of FG/Light.
  143.  
  144. A project file (FGDEMOBC.PRJ) is also provided for the Borland C++ Integrated
  145. Development Environment (IDE). Project files are required within the IDE to
  146. build EXE files that utilize third party libraries such as Fastgraph. Select
  147. the project file from the Project menu in the IDE. Refer to your Borland C++
  148. manuals for more information about project files.
  149.  
  150.  
  151. Microsoft C/C++
  152.  
  153. A make file (FGDEMOMC.MAK) and batch file (BUILDMSC.BAT) are provided for
  154. compiling and linking FGDEMO with Microsoft C/C++. Type "MAKE FGDEMOMC.MAK" to
  155. use the make file, or BUILDMSC to recompile and link all the FGDEMO code. The
  156. make file and batch file are set up to use the Fastgraph/Light medium model
  157. library. Change the library name from FGLM.LIB to FGM.LIB in the LINK command
  158. to use Fastgraph instead of FG/Light.
  159.  
  160. If you are using Microsoft C version 6, do not include the /QC option when
  161. compiling FGDEMO with the medium memory model. Microsoft technical support has
  162. confirmed that this version of the compiler has known problems when passing
  163. structures to functions if /QC is specified. We've noticed no such problems
  164. with the large model, however.
  165.  
  166.  
  167. Microsoft QuickC
  168.  
  169. A make file (FGDEMOQC.MAK) and batch file (BUILDQC.BAT) are provided for
  170. compiling and linking FGDEMO with QuickC. Type "NMAKE FGDEMOQC.MAK" to use
  171. the make file, or BUILDQC to recompile and link all the FGDEMO code. The make
  172. file and batch file are set up to use the Fastgraph/Light medium model
  173. library. Change the library name from FGLM.LIB to FGM.LIB in the LINK command
  174. to use Fastgraph instead of FG/Light.
  175.  
  176. If you are using Fastgraph/Light and you receive the message "out of heap
  177. space" when compiling FGDEMO, unload FGDRIVER and try compiling again.
  178.  
  179.  
  180. Microsoft Visual C++ (16-bit)
  181.  
  182. A make file (FGDEMOVC.MAK) and batch file (BUILDMSC.BAT) are provided for
  183. compiling and linking FGDEMO with Visual C++. Type "NMAKE FGDEMOVC.MAK" to use
  184. the make file, or BUILDMSC to recompile and link all the FGDEMO code. The make
  185. file and batch file are set up to use the Fastgraph/Light medium model
  186. library. Change the library name from FGLM.LIB to FGM.LIB in the LINK command
  187. to use Fastgraph instead of FG/Light.
  188.  
  189.  
  190. Power C
  191.  
  192. A project file (FGDEMOPC.PRJ) and batch file (BUILDPC.BAT) are provided for
  193. compiling and linking FGDEMO with Power C. Type PC FGDEMOPC.PRJ to use the
  194. project file, or BUILDPC to recompile and link all the FGDEMO code. The
  195. project file and batch file are set up to use the Fastgraph/Light medium model
  196. library. Change the library name from FGLM.LIB to FGM.LIB in the PCL command
  197. to use Fastgraph instead of FG/Light.
  198.  
  199.  
  200. Turbo C
  201.  
  202. A batch file (BUILDTC.BAT) is provided for compiling and linking FGDEMO with
  203. Turbo C. Type BUILDTC to recompile and link all the FGDEMO code. The batch
  204. file is set up to use the Fastgraph/Light medium model library. Change the
  205. library name from FGLM.LIB to FGM.LIB in the TLINK command to use Fastgraph
  206. instead of FG/Light.
  207.  
  208.  
  209. Turbo C++
  210.  
  211. A batch file (BUILDTC.BAT) is provided for compiling and linking FGDEMO with
  212. Turbo C++. Type BUILDTC to recompile and link all the FGDEMO code. The batch
  213. file is set up to use the Fastgraph/Light medium model library. Change the
  214. library name from FGLM.LIB to FGM.LIB in the TLINK command to use Fastgraph
  215. instead of FG/Light.
  216.  
  217. A project file (FGDEMOTC.PRJ) is also provided for the Turbo C++ Integrated
  218. Development Environment (IDE). Project files are required within the IDE to
  219. build EXE files that utilize third party libraries such as Fastgraph. Select
  220. the project file from the Project menu in the IDE. Refer to your Turbo C++
  221. manuals for more information about project files.
  222.  
  223.  
  224. Watcom C/C++ (16-bit)
  225.  
  226. A make file (FGDEMOWC.MAK) and batch file (BUILDWC.BAT) are provided for
  227. compiling and linking FGDEMO with Watcom C++. Type "MAKE /f FGDEMOWC.MAK" to
  228. use the make file, or BUILDWC to recompile and link all the FGDEMO code. The
  229. make file and batch file are set up to use the Fastgraph/Light medium model
  230. library. Change the library name from FGLM.LIB to FGM.LIB in the WCL or WLINK
  231. commands to use Fastgraph instead of FG/Light.
  232.  
  233. ------------------------------------------------------------------------------
  234.                           Borland IDE troubleshooting
  235. ------------------------------------------------------------------------------
  236.  
  237. If you have problems compiling and linking FGDEMO within the Borland C++,
  238. Turbo C++, or Turbo C Integrated Development Environment, please check the
  239. following before you call us:
  240.  
  241. 1) Make sure you have a PROJECT FILE that includes the names of all C source
  242. code files comprising FGDEMO, as well as the FGLM.LIB library file name. Some
  243. versions of Turbo C++ require the full path name for library files specified
  244. in a project file. For more information on project files, consult your Borland
  245. manuals.
  246.  
  247. 2) The include files must exist in a path recognized by the IDE. From the
  248. menu, select Options; Directories; Include Directories. Make sure FASTGRAF.H
  249. exists in the path.
  250.  
  251. 3) The library files must exist in a path recognized by the IDE. From the
  252. menu, select Options; Directories; Library Directories. Make sure FGLM.LIB
  253. exists in the path.
  254.  
  255. 4) You must compile and link for the same memory model. From the menu, select
  256. Options; Compiler; Code Generation. Compile for the medium model if linking
  257. with FGLM.LIB.
  258.  
  259. ------------------------------------------------------------------------------
  260.                             About the FGDEMO menus
  261. ------------------------------------------------------------------------------
  262.  
  263. The menu structure is defined in the file DEFS.H. A typdef MENU is defined
  264. which is a structure containing information about each menu item: the function
  265. called when the menu choice is activated, the descriptive name of the menu
  266. item, the x and y location of the menu item, and pointers to the next and
  267. previous items on the menu. Each menu is defined by an array of these
  268. structures, and is initialized at the top of MENU.C.
  269.  
  270. There are two types of menus: a horizontal menu, which is the moving bar menu
  271. at the top of the screen, and vertical menus, also known as "pull-down" menus.
  272. When a pull-down menu is visible, a menu function may be activated by either
  273. clicking the mouse on a highlighted menu function, or by pressing <Enter>.
  274. Arrow keys are used to highlight the next and previous menu item, and a mouse
  275. may also be used.
  276.  
  277. User input relevant to the menus is accepted in two places: within the
  278. vertical_menu function (to activate a menu choice), or in the main function
  279. (to control the horizontal menu). The horizontal menu is also controlled
  280. within the vertical menu, to the extent that if an arrow key is pressed, the
  281. next or previous pull-down menu becomes active.
  282.  
  283. The entire screen, including the horizontal menu and the dithered background,
  284. is drawn at the beginning of the program and stored on the hidden page. When a
  285. function is called, for example "point", part or all of the visual page is
  286. overwritten, in this case with a pattern of points. When a key or mouse button
  287. is pressed, the relevant parts of the hidden page are copied back to the
  288. visual page using fg_transfer, resulting in quick (almost instantaneous)
  289. screen redraws. Occasionally, the entire hidden page needs to be completely
  290. redrawn, such as when a PCX file is displayed, but in most cases only a small
  291. part of the hidden page needs to be redrawn, usually with a single call to
  292. fg_drect. In general, the hidden page is assumed to have a "clean" copy of the
  293. horizontal menu screen throughout the program, and whenever it is overwritten
  294. it is immediately restored.
  295.  
  296. ------------------------------------------------------------------------------
  297.                            About the TGSDEMO program
  298. ------------------------------------------------------------------------------
  299.  
  300. The TGSDEMO program displays the scrolling sky and scaled logo at the start of
  301. FGDEMO. You may also run this program separately entering TGSDEMO at the DOS
  302. command prompt.
  303.  
  304. C++ source code for TGSDEMO is included as part of the FGDEMO distribution.
  305. However, you must have Fastgraph 4.0 and Fastgraph/Image 2.0 to re-link the
  306. program.
  307.  
  308. TGSDEMO was written by Michael Miller of MSJ Applications, Inc., of Valley
  309. Stream, New York.
  310.  
  311. ------------------------------------------------------------------------------
  312.                                  Fastgraph 4.0
  313. ------------------------------------------------------------------------------
  314.  
  315. Fastgraph is a versatile, high-performance programmer's graphics library for
  316. DOS-based PC systems. It is powerful enough to satisfy the most demanding
  317. graphics application, yet it is easy enough for even the novice graphics
  318. programmer. Fastgraph includes more than 275 hand-optimized routines, from
  319. pixel display to sophisticated animation tools. This collection of routines
  320. provides a programmer with proven, powerful tools to take command of the PC
  321. and PS/2 text and graphics video environment.
  322.  
  323. Fastgraph's major functional areas include:
  324.  
  325. * Real mode, 16-bit protected mode, and 32-bit protected mode libraries
  326. * Support for most popular C/C++, Pascal, BASIC, and FORTRAN compilers
  327. * Support for 28 video modes, including SuperVGA, standard and extended VGA,
  328.   MCGA, EGA, Hercules, Tandy, CGA, and color and monochrome text
  329. * Direct SVGA chipset support plus VESA in resolutions of 640x400x256,
  330.   640x480x256, 800x600x256, 1024x768x256, 800x600x16, and 1024x768x16
  331. * SVGA chipset autodetection
  332. * Colors, virtual colors, and palettes
  333. * Graphics fundamentals, including points, solid and dashed lines,
  334.   polygons, circles, ellipses, solid and dithered rectangles, region
  335.   fill, and clipping
  336. * Viewports and world space coordinate system
  337. * A scalable stroked character font
  338. * GIF and PCX display and creation routines
  339. * Support for Autodesk Animator FLI/FLC files
  340. * Bitmapped image support, including mode-specific and mode-independent
  341.   images, transparent pixels, clipped and reversed images, scaled and sheared
  342.   images, image retrieval, pixel run maps, and masking maps
  343. * Fast block transfer routines (BitBlt)
  344. * Virtual buffers
  345. * Physical, virtual, and logical video page management
  346. * Resizeable video pages for smooth, flicker-free panning
  347. * Split screen support
  348. * Animation and special effects
  349. * Keyboard, mouse, and joystick support
  350. * Low-level keyboard handler, ideal for game development
  351. * Sound effects and music, both synchronous and asynchronous
  352. * 750-page tutorial-style user's guide and reference manual
  353. * No royalties
  354.  
  355. ------------------------------------------------------------------------------
  356.                          Fastgraph video mode summary
  357. ------------------------------------------------------------------------------
  358.  
  359. SVGA     640x400x256              MCGA     320x200x256
  360.          640x480x256
  361.          800x600x256              CGA      320x200x4
  362.          1024x768x256                      640x200x2
  363.          800x600x16
  364.          1024x768x16              Hercules 320x200 dithered
  365.                                            720x348
  366. VGA      320x200x256 (Mode X)
  367.          320x240x256 (Mode X)     Tandy    320x200x16
  368.          320x400x256 (Mode X)
  369.          320x480x256 (Mode X)     Text     40x25 color
  370.          640x480x16                        80x25 color
  371.          640x480x2                         80x25 monochrome
  372.                                            80x43 color
  373. EGA      320x200x16                        80x50 color
  374.          640x200x16
  375.          640x350x16
  376.          640x350 monochrome
  377.  
  378. ------------------------------------------------------------------------------
  379.                             Supported SVGA chipsets
  380. ------------------------------------------------------------------------------
  381.  
  382. Ahead "A" type                  Oak OTI-067
  383. Ahead "B" type                  Oak OTI-077
  384. ATI 18800                       Oak OTI-087
  385. ATI 18800-1                     Paradise PVGA1a
  386. ATI 28800                       Paradise WD90C00/10
  387. ATI 38800 (mach8)               Paradise WD90C11/30/31/33
  388. ATI 68800 (mach32)              S3
  389. ATI 88800 (mach64)              Trident 8800
  390. Avance Logic 2000 series        Trident 8900
  391. Chips & Technologies 82c45x     Trident 9000
  392. Cirrus Logic 5400 series        Tseng ET3000
  393. Cirrus Logic 6400 series        Tseng ET4000
  394. Genoa 6000 series               Video7
  395. NCR 77C22/77C32                 plus VESA BIOS support
  396.  
  397. ------------------------------------------------------------------------------
  398.                               Supported compilers
  399. ------------------------------------------------------------------------------
  400.  
  401. 32-bit protected mode:
  402.   Borland C++ (4.02 or above)
  403.   MetaWare High C/C++ (3.0 or above)
  404.   Microsoft Fortran PowerStation (1.0 or above)
  405.   Microsoft Visual C++ 32-bit edition (1.0 or above)
  406.   Watcom C/C++ (9.5 or above)
  407.   Watcom C32 for DOS (9.5 or above)
  408.  
  409. 16-bit protected mode:
  410.   Borland C++ (2.0 or above)
  411.   Borland Pascal (7.0 or above)
  412.   Microsoft C/C++ (5.0 or above)
  413.   Microsoft Visual C++ (1.0 or above)
  414.   Turbo C++ (3.0 or above)
  415.  
  416. Real mode:
  417.   Borland C++ (2.0 or above)
  418.   Borland Pascal (7.0 or above)
  419.   Microsoft BASIC PDS (7.1 or above)
  420.   Microsoft C/C++ (5.0 or above)
  421.   Microsoft FORTRAN (4.0 or above)
  422.   Microsoft QuickBASIC (4.0 or above)
  423.   Microsoft QuickC (2.0 or above)
  424.   Microsoft Visual Basic for DOS (1.0 or above)
  425.   Microsoft Visual C++ (1.0 or above)
  426.   Power C (2.0 or above)
  427.   Turbo C (2.0 or above)
  428.   Turbo C++ (1.0 or above)
  429.   Turbo Pascal (6.0 or above)
  430.   Watcom C/C++ (9.5 or above)
  431.   Zortech C++ (3.0 or above)
  432.  
  433. ------------------------------------------------------------------------------
  434.                             Supported DOS extenders
  435. ------------------------------------------------------------------------------
  436.  
  437. 32-bit:
  438.   Borland PowerPack for DOS
  439.   DOSXMSF (Fortran PowerStation)
  440.   Phar Lap TNT Dos-Extender SDK
  441.   Phar Lap TNT Dos-Extender Lite
  442.   Rational Systems DOS/4G
  443.   Rational Systems DOS/4GW
  444.   Rational Systems DOS/4GW Professional
  445.  
  446. 16-bit:
  447.   Borland Pascal 7 (built in DPMI extender)
  448.   Borland PowerPack for DOS
  449.   Phar Lap 286|Dos-Extender SDK
  450.   Phar Lap 286|Dos-Extender Lite
  451.   Rational Systems DOS/16M
  452.  
  453. ------------------------------------------------------------------------------
  454.                       Summary of Fastgraph 4.0 functions
  455. ------------------------------------------------------------------------------
  456.  
  457. Video initialization
  458. --------------------
  459. fg_automode  determine which available video mode offers the highest
  460.              resolution and number of colors
  461. fg_bestmode  choose the best video mode given resolution and video page
  462.              requirements
  463. fg_cursor    turn the text mode cursor on or off
  464. fg_egacheck  return information about the active EGA or VGA adapter and
  465.              display
  466. fg_getlines  get the number of text rows per video page
  467. fg_getmode   return the current video mode number
  468. fg_initpm    initialize Fastgraph's protected mode kernel
  469. fg_reset     erase the screen, restoring screen attributes if ANSI.SYS
  470.              is loaded
  471. fg_setlines  in EGA/VGA/SVGA text modes, establish 25, 43, or 50 line mode
  472. fg_setmode   establish a video mode and initialize Fastgraph
  473. fg_svgainit  autodetect the SVGA chipset (or VESA) and initialize
  474.              Fastgraph's SVGA kernel
  475. fg_testmode  determine whether or not a video mode is available on the
  476.              system
  477.  
  478. Coordinate systems
  479. ------------------
  480. fg_getmaxx   get the maximum x coordinate in screen space
  481. fg_getmaxy   get the maximum y coordinate in screen space
  482. fg_getview   return current viewport extremes
  483. fg_getworld  determine the current limits of the world space coordinate
  484.              system
  485. fg_initw     initialize the world space coordinate system
  486. fg_setview   define viewport extremes and position
  487. fg_setworld  define the floating point world space coordinate system
  488. fg_xalpha    translate screen space x coordinate to character space column
  489. fg_xconvert  translate character space column to screen space x coordinate
  490. fg_xscreen   translate world space x coordinate to screen space x coordinate
  491. fg_xview     translate horizontal viewport coordinate to screen space
  492. fg_xworld    translate screen space x coordinate to world space x coordinate
  493. fg_yalpha    translate screen space y coordinate to character space row
  494. fg_yconvert  translate character space row to screen space y coordinate
  495. fg_yscreen   translate world space y coordinate to screen space y coordinate
  496. fg_yview     translate vertical viewport coordinate to screen space
  497. fg_yworld    translate screen space y coordinate to world space y coordinate
  498.  
  499. Colors and palettes
  500. -------------------
  501. fg_colors    return number of colors available in the current video mode
  502. fg_defcolor  assign a color value to a virtual color index
  503. fg_getcolor  get the current color index (graphics modes) or display
  504.              attributes (text modes)
  505. fg_getdacs   get the RGB components of a block of DAC registers
  506. fg_getindex  get the color value assigned to a virtual color index
  507. fg_getrgb    get the RGB components of a specified DAC register
  508. fg_maprgb    map six-bit RGB components to a 16-color palette value
  509. fg_palette   assign a color value to a palette
  510. fg_palettes  define 16 palette register values
  511. fg_setattr   establish display attributes in text modes
  512. fg_setcolor  establish the current color index
  513. fg_setdacs   specify RGB components of a block of DAC registers
  514. fg_setrgb    define the RGB value of a palette or video DAC register
  515.  
  516. Graphics fundamentals
  517. ---------------------
  518. fg_box       draw a hollow rectangle
  519. fg_boxdepth  specify the outline size of a hollow rectangle
  520. fg_boxw      draw a hollow rectangle in world space
  521. fg_boxx      draw a hollow rectangle in XOR mode
  522. fg_boxxw     draw a hollow rectangle in XOR mode in world space
  523. fg_circle    draw a hollow circle
  524. fg_circlef   draw a filled circle
  525. fg_circlefw  draw a filled circle in world space
  526. fg_circlew   draw a hollow circle in world space
  527. fg_clprect   draw a clipped rectangle
  528. fg_clprectw  draw a clipped rectangle in world space
  529. fg_dash      draw a dashed line
  530. fg_dashrel   draw a dashed line relative to current position
  531. fg_dashrw    draw a relative dashed line in world space
  532. fg_dashw     draw a dashed line in world space
  533. fg_draw      draw a line
  534. fg_drawrel   draw a line relative to the current position
  535. fg_drawrelx  draw a relative XOR line
  536. fg_drawrw    draw a relative line in world space
  537. fg_drawrxw   draw a relative XOR line in world space
  538. fg_draww     draw a line in world space
  539. fg_drawx     draw an XOR line
  540. fg_drawxw    draw an XOR line in world space
  541. fg_drect     draw a dithered rectangle
  542. fg_drectw    draw a dithered rectangle in world space
  543. fg_ellipse   draw an ellipse
  544. fg_ellipsef  draw a filled ellipse
  545. fg_ellipsew  draw an ellipse in world space
  546. fg_ellipsfw  draw a filled ellipse in world space
  547. fg_erase     clear the active video page
  548. fg_fillpage  fill active video page with current color
  549. fg_flood     like fg_paint but observes the clipping limits
  550. fg_floodw    like fg_paintw but observes the clipping limits
  551. fg_getclip   return current clipping limits
  552. fg_getpixel  get the color value of specified pixel
  553. fg_getxbox   return fg_box left and right edge width
  554. fg_getxpos   get screen space x coordinate of graphics cursor
  555. fg_getybox   return fg_box top and bottom edge width
  556. fg_getypos   get the screen space y coordinate of graphics cursor
  557. fg_inside    check if a specified point is inside a convex polygon
  558. fg_move      position the graphics cursor
  559. fg_moverel   position the graphics cursor relative to current position
  560. fg_moverw    position the graphics cursor, relative, in world space
  561. fg_movew     position the graphics cursor in world space
  562. fg_paint     fast flood fill of any closed area, including an area with
  563.              holes
  564. fg_paintw    world space version of fg_paint
  565. fg_point     draw a point
  566. fg_pointw    draw a point in world space
  567. fg_pointx    draw a point in XOR mode
  568. fg_pointxw   draw a point in XOR mode in world space
  569. fg_polyedge  specify fg_polyfill right and bottom edge inclusion
  570. fg_polyfill  draw a filled convex polygon
  571. fg_polygon   draw an unfilled polygon
  572. fg_polygonw  draw an unfilled polygon in world space
  573. fg_polyline  draw an unfilled polygon from one vertex array
  574. fg_polyoff   define polygon offsets for fg_polyfill and fg_polyline
  575. fg_rect      draw a solid rectangle in screen space or character space
  576. fg_rectw     draw a solid rectangle in world space
  577. fg_setclip   establish limits of clipping region for primitives and
  578.              bitmapped images
  579. fg_setclipw  world space version of fg_setclip
  580.  
  581. Character display
  582. -----------------
  583. fg_chgattr   change display attribute for existing text in text modes
  584. fg_chgtext   change text while preserving the display attributes in text
  585.              modes
  586. fg_fontsize  enable 8x8, 8x14, or 8x16 ROM font (VGA/SVGA only)
  587. fg_getattr   get the display attribute of a given character cell in text
  588.              modes
  589. fg_getchar   get the character value of a given character cell in text modes
  590. fg_getxjust  return fg_print and fg_printc horizontal justification setting
  591. fg_getyjust  return fg_print and fg_printc vertical justification setting
  592. fg_justify   define justification settings for fg_print
  593. fg_locate    define row and column for character display
  594. fg_print     display hardware characters in screen space
  595. fg_printc    version of fg_print that performs clipping
  596. fg_setangle  define the orientation of software (stroked) characters
  597. fg_setratio  define the aspect ratio for software characters
  598. fg_setsize   define the height of software characters in screen space
  599. fg_setsizew  define the height of software characters in world space
  600. fg_swchar    display software (stroked) characters
  601. fg_swlength  compute the length of a string of software characters
  602. fg_swtext    display software characters
  603. fg_text      display hardware (ROM font) characters
  604. fg_textc     version of fg_text that supports clipping
  605. fg_where     return the text cursor position
  606.  
  607. Video page management
  608. ---------------------
  609. fg_allocate  create a virtual page in conventional memory
  610. fg_alloccms  create a logical page in conventional memory
  611. fg_allocems  create a logical page in expanded memory
  612. fg_allocxms  create a logical page in extended memory
  613. fg_findpage  find an available page number for virtual/logical pages
  614. fg_freepage  release a virtual or logical page
  615. fg_getaddr   get the segment address of the active video page
  616. fg_getentry  get address and type of a physical, virtual, or logical page
  617. fg_getpage   get the active video page number
  618. fg_getvpage  get the number of the visual video page
  619. fg_initems   initialize expanded memory (EMS)
  620. fg_initxms   initialize extended memory (XMS)
  621. fg_pagesize  return video page size in bytes
  622. fg_resize    change the size of a video page (use with fg_pan)
  623. fg_setentry  set address and type of a physical, virtual, or logical page
  624. fg_setpage   establish the active video page
  625. fg_setvpage  establish the visual video page
  626.  
  627. Virtual buffer management
  628. -------------------------
  629. fg_vbaddr    return address of a virtual buffer
  630. fg_vballoc   create a virtual buffer (allocate memory internally)
  631. fg_vbclose   close the active virtual buffer
  632. fg_vbcopy    copy rectangular region from one virtual buffer to another
  633. fg_vbcut     copy rectangular region from active video page to virtual buffer
  634. fg_vbdefine  create a virtual buffer (from previously allocated memory)
  635. fg_vbfree    release virtual buffer memory allocated with fg_vballoc
  636. fg_vbhandle  return handle of the active virtual buffer
  637. fg_vbinit    initialize Fastgraph's virtual buffer environment
  638. fg_vbopen    make an existing virtual buffer the active virtual buffer
  639. fg_vbpaste   copy rectangular region from virtual buffer to active video page
  640. fg_vbtccopy  version of fg_vbcopy that supports transparent colors
  641. fg_vbtcxfer  version of fg_vbpaste that supports transparent colors
  642. fg_vbundef   release a virtual buffer handle
  643.  
  644. Bitmapped image management
  645. --------------------------
  646. fg_clipmap   version of fg_drawmap that performs clipping
  647. fg_clipmask  draw a clipped masking map
  648. fg_clpimage  draw a clipped mode-specific bitmap
  649. fg_display   display a pixel run map
  650. fg_displayp  display a packed pixel run map
  651. fg_drawmap   draw a mode-independent bitmap
  652. fg_drawmask  draw a masking map
  653. fg_drwimage  draw a lightning-fast mode-specific bitmap
  654. fg_flipmask  draw an inverted masking map
  655. fg_flpimage  draw an inverted mode-specific bitmap
  656. fg_getimage  retrieve an image as a mode-specific bitmap
  657. fg_getmap    retrieve an image as a mode-independent bitmap
  658. fg_imagesiz  calculate the number of bytes required for mode-specific
  659.              bitmap storage
  660. fg_invert    invert orientation of a bitmapped image array
  661. fg_pack      translate "one pixel per byte" bitmap to mode-specific format
  662. fg_putimage  like fg_drwimage but doesn't check for transparent pixels
  663. fg_revimage  display a reversed mode-specific bitmap
  664. fg_revmask   display a reversed masking map
  665. fg_scale     scale a bitmapped image
  666. fg_shear     shear a bitmapped image
  667. fg_unpack    translate mode-specific bitmap to "one pixel per byte" format
  668.  
  669. Image file routines
  670. -------------------
  671. fg_dispfile  display a pixel run file, packed or unpacked
  672. fg_flicdone  close an FLI or FLC file
  673. fg_flichead  read an FLI or FLC file header
  674. fg_flicmode  determine optimal video mode for an FLI or FLC file
  675. fg_flicopen  open an FLI or FLC file
  676. fg_flicplay  play one or more frames from an FLI or FLC file
  677. fg_flicsize  return FLI or FLC image dimensions
  678. fg_flicskip  advance one or more frames in an FLI or FLC file
  679. fg_gifhead   read a GIF file global header and first local header
  680. fg_gifmode   determine optimal video mode for a GIF file
  681. fg_gifpal    retrieve palette information from a GIF file
  682. fg_gifrange  return GIF image dimensions
  683. fg_imagebuf  define the address and size of the image file buffer
  684. fg_loadpcx   load a PCX image into a virtual buffer
  685. fg_makegif   create a GIF file from a rectangular region of the active
  686.              video page
  687. fg_makepcx   create a PCX file from a rectangular region of the active
  688.              video page
  689. fg_makeppr   create a PPR file from a rectangular region of the active
  690.              video page
  691. fg_makespr   create an SPR file from a rectangular region of the active
  692.              video page
  693. fg_pattern   define dither patterns for pixel run maps
  694. fg_pcxhead   read a PCX file header into a 128-byte buffer
  695. fg_pcxmode   determine the optimal mode for displaying a PCX file
  696. fg_pcxpal    retrieve palette information from a PCX file
  697. fg_pcxrange  return PCX image dimensions
  698. fg_showflic  play an FLI or FLC file
  699. fg_showgif   display a GIF file
  700. fg_showpcx   display a PCX file
  701. fg_showppr   display a packed pixel run (PPR) file
  702. fg_showspr   display a standard pixel run (SPR) file (RLE)
  703.  
  704. Block transfer routines
  705. -----------------------
  706. fg_copypage  copy an entire physical, virtual, or logical page
  707. fg_getblock  transfer rectangular region from video memory to RAM
  708. fg_gethpage  get the number of the current "hidden" video page
  709. fg_putblock  transfer rectangular region from RAM to video memory
  710. fg_restore   fast rectangular area copy from hidden to visual page
  711. fg_restorew  world space version of fg_restore
  712. fg_save      fast rectangular area copy from visual to hidden page
  713. fg_savew     world space version of fg_save
  714. fg_sethpage  establish the hidden video page
  715. fg_tcdefine  define transparent color number for fg_tcxfer
  716. fg_tcmask    define transparent colors for fg_tcxfer
  717. fg_tcxfer    transfer rectangular area with transparent colors
  718. fg_transfer  fast rectangular region copy from any page to any page (bitblt)
  719.  
  720. Special effects
  721. ---------------
  722. fg_fadein    copy hidden to visual page in small, random increments
  723. fg_fadeout   erase the visual page in small, random increments
  724. fg_pan       change the screen origin for full-screen four-directional
  725.              smooth scrolling
  726. fg_panw      world space version of fg_pan
  727. fg_scroll    smooth vertical scrolling of rectangular area
  728. fg_split     enable or disable a split screen environment
  729.  
  730. Keyboard control
  731. ----------------
  732. fg_capslock  turn the CapsLock key on or off
  733. fg_getkey    wait for a keystroke or retrieve the next value from the
  734.              keystroke buffer
  735. fg_intkey    get the next entry from BIOS keyboard buffer if it is not empty
  736. fg_kbinit    enable or disable the low-level keyboard handler
  737. fg_kblast    return scan code of most recent keypress
  738. fg_kbreset   reset Fastgraph's low-level keyboard handler
  739. fg_kbtest    determine if a key is now pressed or released
  740. fg_numlock   get the state of the NumLock key
  741. fg_scrlock   get the state of the ScrollLock key
  742. fg_setcaps   turn the CapsLock key on or off
  743. fg_setnum    turn the NumLock key on or off
  744. fg_waitkey   wait for any keystroke
  745.  
  746. Mouse management
  747. ----------------
  748. fg_mouse256  define 256-color mouse cursor
  749. fg_mousebut  get information about the mouse - were buttons pressed, and
  750.              where?
  751. fg_mousecur  define the appearance of the mouse cursor in text modes
  752. fg_mousefin  unhook Fastgraph's XVGA or SVGA mouse handler
  753. fg_mouseini  initialize the mouse
  754. fg_mouselim  define limits of mouse movement
  755. fg_mousemov  position the mouse cursor
  756. fg_mousepos  get the current mouse position and button status
  757. fg_mouseptr  define shape and appearance of mouse cursor in graphics modes
  758. fg_mousespd  control the speed of mouse cursor relative to the speed of the
  759.              mouse
  760. fg_mousevis  make the mouse cursor visible or invisible
  761.  
  762. Joystick support
  763. ----------------
  764. fg_button    get a joystick's button status
  765. fg_getxjoy   get the horizontal position of the specified joystick
  766. fg_getyjoy   get the vertical position of the specified joystick
  767. fg_initjoy   initialize either joystick
  768. fg_intjoy    return keyboard codes analogous to joystick position and
  769.              button status
  770.  
  771. Sound effects and music
  772. -----------------------
  773. fg_hush      immediately stop any asynchronous sound or music
  774. fg_hushnext  stop asynchronous sound or music after the current iteration
  775. fg_music     play a sequence of musical notes
  776. fg_musicb    play asynchronous music (background music)
  777. fg_playing   determine whether there is any asynchronous sound in progress
  778. fg_quiet     stop continuous sound
  779. fg_resume    after suspending asynchronous music, continue the music
  780. fg_sound     produce a tone of specified frequency and duration
  781. fg_sounds    play a series of tones, concurrent with other activity
  782. fg_suspend   suspend asynchronous sound (see fg_resume)
  783. fg_voice     produce sound on TI sound chip (as in Tandy 1000)
  784. fg_voices    play a series of tones on TI sound chip, concurrent with other
  785.              activity
  786.  
  787. Timing
  788. ------
  789. fg_getclock  get the number of clock ticks since midnight
  790. fg_measure   benchmark the system speed to determine delay units for fg_stall
  791. fg_stall     stall for a given number of delay units (see fg_measure)
  792. fg_waitfor   delay a specified number of clock ticks (18.2 per second)
  793.  
  794. Miscellaneous
  795. -------------
  796. fg_getbanks  return current SVGA read and write bank numbers
  797. fg_memavail  determine the amount of conventional memory available to DOS
  798. fg_memory    return the amount of video memory present in kilobytes
  799. fg_setbanks  define SVGA read and write bank numbers
  800. fg_setfunc   specify the logical operation in EGA/VGA modes (XOR/OR/AND)
  801. fg_svgaver   return Fastgraph SVGA kernel version number
  802. fg_version   return Fastgraph version number
  803. fg_vgastate  save or restore the internal VGA state
  804. fg_waitvr    specify if functions wait internally for vertical retrace
  805.  
  806. ------------------------------------------------------------------------------
  807.                                Fastgraph/Light
  808. ------------------------------------------------------------------------------
  809.  
  810. Fastgraph/Light is the shareware version of Fastgraph. The major differences
  811. between Fastgraph and Fastgraph/Light are:
  812.  
  813. 1) Fastgraph/Light requires an external TSR video driver (FGDRIVER.EXE) that
  814.    you must load before running programs developed with the product. Fastgraph
  815.    creates stand-alone EXE files that do not use FGDRIVER and only include
  816.    those Fastgraph routines your program actually uses.
  817.  
  818. 2) Fastgraph/Light supports real mode only. Fastgraph includes libraries for
  819.    real mode, 16-bit protected mode, and 32-bit protected mode. The FGDRIVER
  820.    video driver in Fastgraph/Light precludes protected mode support.
  821.  
  822. 3) Fastgraph/Light does not include the GIF support and world space functions
  823.    available in Fastgraph. Including these functions in Fastgraph/Light would
  824.    considerably increase the FGDRIVER memory requirements.
  825.  
  826. 4) Fastgraph comes with a 750-page softcover manual. Fastgraph/Light comes
  827.    with an on-line manual.
  828.  
  829. 5) Fastgraph provides better performance than Fastgraph/Light because of the
  830.    overhead associated with Fastgraph/Light's TSR video driver. This is
  831.    especially true for routines that do relatively little, such as FG_POINT.
  832.  
  833. Any programs developed using Fastgraph/Light are 100% source code compatible
  834. with Fastgraph. If you purchase Fastgraph after trying Fastgraph/Light, all
  835. you need to do is re-link your programs.
  836.  
  837. We will mail Fastgraph/Light to you at no charge, or you can download it from
  838. our bulletin board or internet ftp site (ftp.accessnv.com). If you want to
  839. download it, look for the following files for version 4.02 of Fastgraph/Light:
  840.  
  841.         FGL402A.ZIP -- libraries, install program, utilities
  842.         FGL402B.ZIP -- complete 700 page documentation
  843.         FGL402C.ZIP -- C source code for example programs
  844.         FGL402D.ZIP -- BASIC source code for example programs
  845.         FGL402E.ZIP -- Pascal source code for example programs
  846.         FGL402F.ZIP -- FORTRAN source code for example programs
  847.  
  848. You will probably only want to download FGLA402A.ZIP and FGL402B.ZIP and your
  849. choice of one of the other four files, depending on what language you are
  850. programming in. These file names are current as of February 1995, but we
  851. update the files regularly so the version numbers will change periodically.
  852.  
  853. To download Fastgraph/Light from CompuServe, select library 3 of the Game
  854. Developers forum (GO GAMDEV) and browse for "Fastgraph". The CompuServe file
  855. names are FGLA.ZIP through FGLF.ZIP.
  856.  
  857. ------------------------------------------------------------------------------
  858.                               Fastgraph/Fonts 2.0
  859. ------------------------------------------------------------------------------
  860.  
  861. Fastgraph/Fonts lets you easily add bitmapped character support to Fastgraph
  862. applications. The product includes 40 font files in several point sizes, font
  863. scaling and conversion utilities, and an interactive font editor that can
  864. translate TrueType font files to the Fastgraph/Fonts font file format. A
  865. program can load up to 32 fonts simultaneously. Font files shipped with
  866. Fastgraph/Fonts may be distributed without royalties in your applications.
  867.  
  868. Fastgraph/Fonts 2.0 requires Fastgraph 4.0 or Fastgraph/Light 4.0.
  869.  
  870. ------------------------------------------------------------------------------
  871.                               Fastgraph/Image 2.0
  872. ------------------------------------------------------------------------------
  873.  
  874. Fastgraph/Image is a Fastgraph add-on product that provides functions and
  875. utilities for managing resource files containing images and other files. While
  876. the product was designed to manage and display PCX, GIF, pixel run, and flic
  877. images stored in resource files, Fastgraph/Image can be used with any type of
  878. file, including bitmaps, text files, and Fastgraph/Fonts font files. Besides
  879. making your product distribution neater, Fastgraph/Image resource files save
  880. disk space normally lost to DOS disk sectoring.
  881.  
  882. Fastgraph/Image 2.0 requires Fastgraph 4.0.
  883.  
  884. ------------------------------------------------------------------------------
  885.                              Ordering Information
  886. ------------------------------------------------------------------------------
  887.  
  888. The Fastgraph family of products represents a high-performance, comprehensive
  889. development system for graphics programmers. For more information about any of
  890. our products, please call, write, or FAX. You can download evaluation versions
  891. and product demos from our technical support BBS at (702) 796-7134, or from
  892. our internet ftp sites FTP.ACCESSNV.COM and SWCBBS.COM.
  893.  
  894. We accept Visa, MasterCard, and COD (extra charge for COD orders). Purchase
  895. orders are welcome from most companies, schools, and government agencies, but
  896. prior approval is required from TGS. After December 31, 1995, please contact
  897. TGS for current version and pricing information.
  898.  
  899. Source code and site licenses are available for all products. Please call,
  900. write, or FAX for details.
  901.  
  902. For your convenience, the order form below appears by itself in the ORDER.FRM
  903. file.
  904.  
  905. Order from:                                              Voice: (702) 735-1980
  906. Ted Gruber Software                                        FAX: (702) 735-4603
  907. PO Box 13408                                               BBS: (702) 796-7134
  908. Las Vegas, NV  89112                                       CIS:     72000,1642
  909.  
  910. Name:    _____________________________________________________________________
  911.  
  912. Company: _____________________________________________________________________
  913.  
  914. Address: _____________________________________________________________________
  915.  
  916. City:    _____________________________________  State: ________  Zip: ________
  917.  
  918. Country: _________________ Phone: __________________  FAX: ___________________
  919.  
  920. +=====+=========================================+=======+============+=======+
  921. |     |                                         | Price |  Shipping  |       |
  922. | Qty |            Product Description          | Each  | Code  Cost | Total |
  923. +=====+=========================================+=======+=====+======+=======+
  924. |     | Fastgraph graphics library              | $249  |  1  |      |       |
  925. +-----+-----------------------------------------+-------+-----+------+-------+
  926. |     | Fastgraph/Light with on-line manual     |  $49  |  2  |      |       |
  927. |     | (registered version)                    |       |     |      |       |
  928. +-----+-----------------------------------------+-------+-----+------+-------+
  929. |     | Fastgraph/Light with printed manual     |  $79  |  1  |      |       |
  930. |     | (registered version)                    |       |     |      |       |
  931. +-----+-----------------------------------------+-------+-----+------+-------+
  932. |     | Fastgraph/Fonts bitmapped font support  |  $69  |  2  |      |       |
  933. |     | (requires Fastgraph or Fastgraph/Light) |       |     |      |       |
  934. +-----+-----------------------------------------+-------+-----+------+-------+
  935. |     | Fastgraph/Image image management toolkit|  $69  |  2  |      |       |
  936. |     | (requires Fastgraph)                    |       |     |      |       |
  937. +-----+-----------------------------------------+-------+-----+------+-------+
  938. |     | FG/Fonts and FG/Image bundle            | $118  |  2  |      |       |
  939. +-----+-----------------------------------------+-------+-----+------+-------+
  940. |     | Graphics Power Pack                     | $359  |  1  |      |       |
  941. |     | Fastgraph, FG/Fonts, and FG/Image       |       |     |      |       |
  942. +=====+=========================================+=======+=====+======+=======+
  943.                                                            Subtotal  |       |
  944. *********************************                                    +=======+
  945. *                               *    Nevada residents add sales tax  |       |
  946. * Shipping charges per product: *                                    +=======+
  947. *                               *     COD orders (U.S. only) add $6  |       |
  948. *     Code 1         Code 2     *                                    +=======+
  949. *   ----------     ----------   *                             Total  |       |
  950. *   U.S.    $7     U.S.    $3   *                                    +=======+
  951. *   Canada $10     Canada  $3   *    Method of payment:
  952. *   Other  $30     Other   $6   *
  953. *                               *       [ ] payment enclosed
  954. *********************************       [ ] Visa or MasterCard
  955.                                         [ ] COD
  956.                                         [ ] purchase order # _________________
  957. For credit card orders only:
  958.  
  959. Card number: ____________________________________  Expiration date: __________
  960.  
  961. Signature:   _________________________________________________________________
  962.